/*
 * 版权所有(c)  1952110078@qq.com  2022 - 2022
 */

package com.ldc.module_main.activity;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;

import androidx.annotation.Nullable;

import com.ldc.commonlibs.ui.VMActivityBase;
import com.ldc.commonlibs.utils.ViewModelUtil;
import com.ldc.module_main.databinding.MainActivitySearchBinding;
import com.ldc.module_main.viewmodel.SearchViewModel;

public class SearchActivity extends VMActivityBase<MainActivitySearchBinding, SearchViewModel> {

    public static void start(Context context) {
        context.startActivity(new Intent(context, SearchActivity.class));
    }


    @Override
    protected void main(@Nullable Bundle savedInstanceState) {
        initListener();
    }

    @Override
    protected MainActivitySearchBinding initViewBinding() {
        return MainActivitySearchBinding.inflate(getLayoutInflater());
    }

    @Override
    protected SearchViewModel initViewModel() {
        return ViewModelUtil.create(this, SearchViewModel.class);
    }

    private void initListener() {
        viewBinding.searchTopBar.ivBack.setOnClickListener(v -> finish());
    }
}